home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / HyperCard Related / APDA HyperCard Toolkits / CD Audio Toolkit 1.0 / CD Audio Toolkit / Documentation 1.0 / Documentation 1.0 / card_11985.txt < prev    next >
Encoding:
Text File  |  1995-02-07  |  3.0 KB  |  71 lines

  1. -- card: 11985 from stack: in.0
  2. -- bmap block id: 13028
  3. -- flags: 0000
  4. -- background id: 3170
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on opencard
  8.   set the scroll of cd field 1 to 0
  9. end opencard
  10.  
  11.  
  12.  
  13. -- part 2 (field)
  14. -- low flags: 01
  15. -- high flags: 2007
  16. -- rect: left=121 top=81 right=323 bottom=494
  17. -- title width / last selected line: 0
  18. -- icon id / first selected line: 0 / 0
  19. -- text alignment: 0
  20. -- font id: 2
  21. -- text size: 10
  22. -- style flags: 0
  23. -- line height: 13
  24. -- part name: 
  25.  
  26.  
  27. -- part contents for background part 1
  28. ----- text -----
  29. Database format for CD Remote.
  30.  
  31. -- part contents for background part 2
  32. ----- text -----
  33. The Hypercard CD Audio ToolKit.
  34.  
  35. -- part contents for background part 9
  36. ----- text -----
  37. Command:
  38.  
  39. -- part contents for card part 2
  40. ----- text -----
  41. The file ‚ÄúCD Remote Programs‚Äù is used by the CD Remote desk accessory and these XCMDs to retain information about a CD.  This file contains some initial data, plus three resources for each CD that has been entered into the database.  The three resource types are ‚ÄúIndX‚Äù, ‚ÄúProG‚Äù, and ‚ÄúSTR#‚Äù.   There is only one ‚ÄúIndX‚Äù resource, number 128, in the ‚ÄúCD Remote Programs‚Äù file.  There is a ‚ÄúProG‚Äù and ‚ÄúSTR#‚Äù resource for each CD for which we have stored information.
  42.  
  43. The initial two bytes of the ‚ÄúIndX‚Äù resource are a version number.  The next two bytes are the number of CDs in the database.  The ‚ÄúIndX‚Äù resource contains a six byte entry for each CD. The first byte is the number of tracks on the CD.  The next three bytes are the number of (1/75th of a second) blocks on the CD.   The last two bytes are the resource number of the ProG and STR# resources for this CD.  
  44.  
  45. A new resource number is obtained by calling the Resource Manager Unique1ID call.  The ‚ÄúProG‚Äù resource contains the sequence for playing the audio tracks.  By default, it goes from 1 to n, where n is the number of tracks on the CD.  The numbers are stored in BCD.
  46.  
  47. The ‚ÄúSTR#‚Äù resource contains a list of strings.  The first string is the volume title.  The next n strings contain the titles of each of the tracks on the CD, in their normal order (i.e. this order matches with the ‚ÄúProG‚Äù resource order; the nth+1 title is for track n only if the ‚ÄúProG‚Äù resource is in normal, default order.)  If the user has changed the track order, the STR# changes as well.
  48.  
  49. An example IndX resource:
  50.  
  51. 0010 0002 0B50 0240 276B 0C44 1365 1D0C
  52. version number: 1.0
  53. number of discs we know about: 2
  54. number of tracks on disc: 11
  55. CD Identification: 5,243,456 blocks (1/75th of a second) on this disc
  56. Reource ID for ProG and STR# resources: 10091
  57. number of tracks on disc: 12
  58. CD Identification: 4,461,413 blocks on this disc
  59. Resource ID for ProG and STR# resources:7436
  60.  
  61. An example ProG resource:
  62.  
  63. 000B 0101 0102 0103 0104 0105 0107 0106 0008 0109 0110 0111
  64. Number of tracks on this disc: 11 (notice BCD!)
  65. 01:play this track. 00: don‚Äôt play this track
  66. track number 1, etc.
  67. play track 7 before track 6
  68. don‚Äôt play track 8
  69.  
  70. The STR# resource format is described in Inside Macintosh, page I-476.
  71.